﻿<%@ Page Language="C#" AutoEventWireup="true"  CodeFile="Default.aspx.cs" Inherits="_Default" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>Scribd Document Browser DEMO APPLICATION</title>
    <style type="text/css">
        body{font-family:Georgia;}
        td{text-align:left;vertical-align:top;}
        .header{border-bottom:solid 1px #CCC;font-weight:bold;padding:4px;}
    </style>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <table width="100%" cellpadding="0" cellspacing="0">
            <tr>
                <td style="font-size:18px;font-weight:bold;color:Maroon;">Scribd Document Browser DEMO APPLICATION</td>
                <td style="text-align:right;">Welcome, <asp:Label runat="server" ID="username" />!</td>
            </tr>
            <tr><td colspan="2" style="border-top:solid 2px #CCC;text-align:right;padding-right: 4px;">
                <a href="uploadFile.aspx">Upload File</a>
                </td></tr>
            <tr>
                <td class="header">Your documents</td>
                <td class="header">Viewer</td>
            </tr>
            <tr>
                <td style="border:solid 1px #CCC;">
                    <asp:repeater runat="server" ID="documentListView">
                        <HeaderTemplate>
                            <table width="100%" cellspacing="0" cellpadding="0">
                            <tr>
                                <td class="header">Title</td>
                                <td class="header">Description</td>
                                <td class="header">Access</td>
                                <td class="header">Type</td>
                            </tr>
                        </HeaderTemplate>
                        <SeparatorTemplate><tr><td colspan="4" style="border-top:solid 1px #CCC;">&nbsp;</td></tr></SeparatorTemplate>
                        <ItemTemplate>
                            <tr>
                                <td>
                                    <a href='?id=<%#((Scribd.Net.Document)Container.DataItem).DocumentId %>'><img alt="thumbnail" src='<%#((Scribd.Net.Document)Container.DataItem).ThumbnailUrl.ToString() %>' border="0" /><br /><%#((Scribd.Net.Document)Container.DataItem).Title %></a>
                                </td>
                                <td>
                                    <label><%#((Scribd.Net.Document)Container.DataItem).Description %></label>
                                </td>
                                <td>
                                    <label><%#((Scribd.Net.Document)Container.DataItem).AccessType.ToString() %></label>
                                </td>
                                <td>
                                    <label><%#((Scribd.Net.Document)Container.DataItem).DocumentType %></label>
                                </td>
                            </tr>
                        </ItemTemplate>
                        <FooterTemplate></table></FooterTemplate>
                    </asp:repeater>
                </td>
                <td style="padding-left:4px;padding-right:4px;border:solid 1px #CCC;">
                    <asp:PlaceHolder runat="server" ID="embedLocation" />
                </td>
            </tr>
            <tr>
                <td colspan="2" style="padding: 10px 4px 10px 0;">Search Term: <asp:TextBox runat="server" ID="searchTerm" /> 
                    <asp:Button runat="server" ID="searchButton" Text="Search" 
                        onclick="searchButton_Click" /></td>
            </tr>
        </table>
        <div style="border-top:dotted 1px #CCC;font-style:italic;color:#333;font-size:10px;text-align:right;padding:4px;">This is a demonstration application for the Scribd.Net client library.</div>
    </div>
    </form>
</body>
</html>
